/**
 * @(#) OverView.as
 *
 * @date		2009. 04. 20.
 * @version		1.0
 * @author		Jo, ChangHun
 * @description	연말정산 메인 view - Mediator
 * 				연말정산 조회하는 Presentation Logic을 관리 
 */
package com.skt.common_hr.yearadjustment.view
{
	import com.skt.common_hr.common.Messages;
	import com.skt.common_hr.common.PsHrAlert;
	import com.skt.common_hr.common.Variables;
	import com.skt.common_hr.common.puremvc.OverViewMediator;
	import com.skt.common_hr.yearadjustment.YearAdjustmentFacade;
	import com.skt.common_hr.yearadjustment.events.ResultViewEvent;
	import com.skt.common_hr.yearadjustment.events.ViewChangeEvent;
	import com.skt.common_hr.yearadjustment.model.*;
	import com.skt.common_hr.yearadjustment.model.vo.*;
	import com.skt.common_hr.yearadjustment.view.components.YearAdjustmentView;
	import com.skt.common_hr.yearadjustment.view.components.popPrintReport;
	import com.wcl.utils.StringUtil;
	
	import flash.events.Event;
	import flash.net.URLRequest;
	import flash.net.URLVariables;
	import flash.net.navigateToURL;
	
	import mx.collections.ArrayCollection;
	import mx.controls.Alert;
	import mx.core.IFlexDisplayObject;
	import mx.managers.PopUpManager;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	

	public class YearAdjustmentMediator extends OverViewMediator
	{ 
		public static const NAME:String = "YearAdjustmentMediator"; 
		
		private var resultViewMsg:String = "";
		
		//소득공제 신고서 (1Page) 클릭 여부
		private var b1Page:Boolean = true;
		
		/**
		* 생성자
		* 
		* @param
		* @return void
		*/
        public function YearAdjustmentMediator( viewComponent:Object )
        {
        	//
//        	Variables.company = "FNU";
//        	Variables.open = "2";
        	
            super( NAME, viewComponent );
            Variables.yearPernr = Variables.myPernr;
            view.callLater(initView);
        }
 		
		/**
		* View를 초기화 한다.
		*	- View에 기본사항을 출력하고 data를 load
		* @param
		* @return void
		*/
 		private function initView():void
 		{
 			onSelectMainData();
 			//view.addEventListener(YearAdjustmentView.WRITE_VIEW_OPEN, regMediator);
 			view.addEventListener(ViewChangeEvent.DETAIL_CHANGE_VIEW, regMediator);
 			view.addEventListener(YearAdjustmentView.SAVE_DATA, onSaveData);
 			view.addEventListener(YearAdjustmentView.LIST_VIEW_OPEN, listViewOpen);
 			view.addEventListener(YearAdjustmentView.SIMUL_VIEW_OPEN, simulViewOpen);
 			view.addEventListener(ResultViewEvent.RESULT_CHANGE_VIEW, resultViewOpen);
 			view.addEventListener(YearAdjustmentView.CLICK_PRINT_PAPER, onClickPrintPaper);
 			view.addEventListener(YearAdjustmentView.SUMMARY_MEDIATOR_CALL, onSummaryMediatorCall);
 			view.addEventListener(YearAdjustmentView.TOTALINCOME_MEDIATOR_CALL, onTotalIncomeMediatorCall);
 			view.addEventListener(YearAdjustmentView.BASICSUBTRACTION_MEDIATOR_CALL, onBasicSubtrationMediatorCall);
 			view.addEventListener(YearAdjustmentView.ANNUITY_SUBTRACTION_MEIDATOR_CALL, onAnnuitySubtractionCall);
 			view.addEventListener(YearAdjustmentView.HOUSEFUND_MEDIATOR_CALL, onHouseFundSubtrationMediatorCall);
 			view.addEventListener(YearAdjustmentView.PREMINUM_MEDIATOR_CALL, onPremiumMediatorCall);
 			view.addEventListener(YearAdjustmentView.EDUCATIONAL_MEDIATOR_CALL, onEducationalMediatorCall);
 			view.addEventListener(YearAdjustmentView.DONATION_MEDIATOR_CALL, onDonationMediatorCall);
 			view.addEventListener(YearAdjustmentView.ANNUITYSAVING_MEDIATOR_CALL, onAnnuitySavingMediatorCall);
 			view.addEventListener(YearAdjustmentView.HOUSESAVING_MEDIATOR_CALL, onHouseSavingMediatorCall);
 			view.addEventListener(YearAdjustmentView.CREDIT_CARD_MEDIATOR_CALL, onCreditCardMediatorCall);
//shgoo : 혼인,장례,이사비 공제 탭 삭제 	2010.01.14 			
// 			view.addEventListener(YearAdjustmentView.MARRIAGE_MEDIATOR_CALL, onMarriageMediatorCall); 			
 			view.addEventListener(YearAdjustmentView.OTHERSUBTRACTION_MEDIATOR_CALL, onOtherSubtractionMediatorCall);
 			view.addEventListener(YearAdjustmentView.AMOUNTREDUCTION_MEDIATOR_CALL,  onAmountReductionMediatorCall);
 			view.addEventListener(YearAdjustmentView.POPMEDICALSUBTRACTION_MEDIATOR_CALL, onreqMedicalSubtractionMediatorCall);
 			
//ywshin 2011.1.03
 			view.addEventListener(YearAdjustmentView.PRINT_REPORT, onPrintReport);
//shgoo 2010.01.14
			//소득공제 신고서 (1Page) 버튼  클릭 리스너
			view.addEventListener(YearAdjustmentView.INCOME_REPORT_CALL, onIncomeReport);
			view.addEventListener(YearAdjustmentView.INCOME_REPORT_CALL2, onIncomeReport2);
			view.addEventListener(YearAdjustmentView.CREDIT_CARD_REPORT_CALL, onCreditCardReport);
			view.addEventListener(YearAdjustmentView.MEDICAL_REPORT_CALL, onMedicalReport);
			view.addEventListener(YearAdjustmentView.DONATION_REPORT_CALL, onDonationReport);
//////////////////			
 			
 			view.addEventListener(YearAdjustmentView.PRESENT_REPORT_CALL, onPresentReport);
 		}

 		override protected function clearView():void
 		{
 			view.vsMainView.selectedIndex = 0;
//shgoo debug 			
 			view.mainList.removeAll();
////////////// 			
 			trace("clear YearAdjustmentView"); 
 		}
 		
 		//상세화면 기본 View데이터 조회
 		private function regMediator(event:ViewChangeEvent):void{
 			view.vsMainView.selectedIndex = 1;
 			view.isModify(YearAdjustmentView.CHECK_REQ_START);
 			detailDataLoad(event.year);
 		}
 		
 		private function detailDataLoad(year:String):void{
 			var proxy:BasicViewInfoProxy = facade.retrieveProxy(BasicViewInfoProxy.NAME) as BasicViewInfoProxy;
 			proxy.load(Variables.yearPernr, year);
 			 			
 			loadAddressData(year);
 		}
 		
 		private function loadAddressData(year:String):void
 		{
 			var addrProxy:AddressProxy = facade.retrieveProxy(AddressProxy.NAME) as AddressProxy;
 			addrProxy.load(Variables.yearPernr, year);
 		}
 		
 		private function onClickPrintPaper(e:Event):void
 		{
 			var proxy:PrintPaperProxy = facade.retrieveProxy(PrintPaperProxy.NAME) as PrintPaperProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
 		}
 		
 		private function printPaper(url:String):void
 		{
			var req:URLRequest = new URLRequest("../yea/"+url);
			trace(url);
			navigateToURL(req);
 		}
 		
 		//저장버튼 클릭 전체 데이터 저장
 		private function onSaveData(event:Event):void{
 			var addCheck:String = view.reqSummary.address.fulladdress;
 			addCheck = StringUtil.trim(addCheck);
 			if(addCheck == null || addCheck == '') {
 				Alert.show('주민등록주소를 사전에 입력하시기 바랍니다');
 				return;
 			}
 			var proxy:YearAdjustmentProxy = facade.retrieveProxy(YearAdjustmentProxy.NAME) as YearAdjustmentProxy;
 			
 			var detailD:Array = new Array();
 			var obj:Object = new Object();
 			
 			//주택자금
 			view.reqHouseFundSubtraction.resetVo();
 			obj.REPAY = view.houseFundVo.REPAY;
 			 
 			obj.INDPL = view.houseFundVo.INDPL;
 			obj.MRNTD = view.houseFundVo.MRNTD;
 			obj.FPRDO = view.houseFundVo.FPRDO;
 			obj.INTTL = view.houseFundVo.INTTL;
 			obj.INSLN = view.houseFundVo.INSLN;
 			//2012.12.28 j.t 추가
 			obj.INTFN = view.houseFundVo.INTFN;
 			obj.INTOT = view.houseFundVo.INTOT;
 
 
 			//기타소득공제
 			view.reqOtherSubtraction.resetVo();
 			obj.SMBFI = view.otherSubtractionVo.SMBFI;
 			obj.TINVS = view.otherSubtractionVo.TINVS;
			obj.NINVS = view.otherSubtractionVo.NINVS;
			
			obj.PINVS = view.otherSubtractionVo.PINVS; // 2103에 다시 생김 
			 
			//2013
			obj.INVST = view.otherSubtractionVo.INVST;
			obj.VINVS = view.otherSubtractionVo.VINVS;
			
			
			obj.COMST = view.otherSubtractionVo.COMST;
  			obj.LTSF1 = view.otherSubtractionVo.LTSF1;
 			obj.LTSF2 = view.otherSubtractionVo.LTSF2;
 			obj.LTSF3 = view.otherSubtractionVo.LTSF3;
 			//2012.01.05
 			obj.INDIF = view.otherSubtractionVo.INDIF;
 			
 			//2014
 			obj.FINVT = view.otherSubtractionVo.FINVT;
 			obj.FINVS = view.otherSubtractionVo.FINVS;
 			obj.IRLWL = view.otherSubtractionVo.IRLWL;

 			
 			
 			// 세액공제
 			obj.FTCHI = view.amountReductionVo.FTCHI;
 			obj.ABPAY = view.amountReductionVo.ABPAY;
 			obj.KORCR = view.amountReductionVo.KORCR;
 			
 			/*
 			PsHrAlert.showMessage("기타소득 : " + obj.SMBFI);
			
//////////////////
//shgoo 2010.01.11
 			obj.HSSAV = view.houseFundVo.HSSAV;
 			obj.EEHSS = view.houseFundVo.EEHSS;
 			obj.LHSSV = view.houseFundVo.LHSSV;
//////////////////
 
 			//혼인장례비
 			obj.CONMA = view.marriageVo.CONMA; 
 			obj.CONFU = view.marriageVo.CONFU; 
 			obj.CONRE = view.marriageVo.CONRE; 
 			

 			obj.FPERP = view.otherSubtractionVo.FPERP;
 			obj.FPERN = view.otherSubtractionVo.FPERN;
//shgoo 2020.01.11 			
// 			obj.HSSAV = view.otherSubtractionVo.HSSAV;
//shgoo 2010.01.06
// 			obj.EEHSS = view.otherSubtractionVo.EEHSS;
// 			obj.LHSSV = view.otherSubtractionVo.LHSSV;
////////////////// 			
 			
//shgoo 2010.01.05 
			//장기주식형 저축액 - 2년차 불입액
///////////////////
 			
 			//세액감면
 			obj.FTCHI = view.amountReductionVo.FTCHI;
 			
 			*/
 			
 			detailD.push(obj);
 			proxy.save(Variables.yearPernr, view.selYear, detailD);
 		}
 		
		/***
 		 * 저장실패시 /100한 금액 이전으로 return 
 		 * **/
 		private function returnAmt():void{
 			//주택자금
 			view.houseFundVo.REPAY *= 100; 
 			view.houseFundVo.FPRDO *= 100;
 			view.houseFundVo.INTTL *= 100;
//shgoo 2010.01.07
 			view.houseFundVo.INSLN *= 100;
/////////////////
//shgoo 2010.01.11
 			view.houseFundVo.HSSAV *= 100;
 			view.houseFundVo.EEHSS *= 100;
 			view.houseFundVo.LHSSV *= 100;
//////////////////
 			
 			//기타소득공제
 			view.otherSubtractionVo.FPERP *= 100;
 			view.otherSubtractionVo.FPERN *= 100;
 			view.otherSubtractionVo.SMBFI *= 100;
//shgoo 2010.01.11 			
// 			view.otherSubtractionVo.HSSAV *= 100;
//shgoo 2010.01.06
// 			view.otherSubtractionVo.EEHSS *= 100;
// 			view.otherSubtractionVo.LHSSV *= 100;
////////////////// 			
 			
 			view.otherSubtractionVo.PINVS *= 100;
 			view.otherSubtractionVo.TINVS *= 100;
 			
 			//2013
 			view.otherSubtractionVo.INVST *= 100;
 			view.otherSubtractionVo.VINVS *= 100;
 			
 			//2014
 			view.otherSubtractionVo.FINVT *= 100;
 			view.otherSubtractionVo.FINVS *= 100;
 			view.otherSubtractionVo.IRLWL *= 100;
 			view.otherSubtractionVo.LTAIS *= 100;
 			
 			
 			view.otherSubtractionVo.LTSF1 *= 100;
 			//세액감면
 			view.amountReductionVo.FTCHI *= 100;
//shgoo 2010.01.05 
			//장기주식형 저축액 - 2년차 불입액
 			view.otherSubtractionVo.LTSF2 *= 100;
///////////////////
 			
 		}
 		
 		private function listViewOpen(event:Event):void{
 			view.vsMainView.selectedIndex = 0;
 			onSelectMainData();
 		}
 		
 		private function resultViewOpen(event:ResultViewEvent):void{
 			//view.vsMainView.selectedIndex = 2;
 			resultViewMsg = event.msg;
 			var Mediator:reqCalculationResultMediator = facade.retrieveMediator(reqCalculationResultMediator.NAME) as reqCalculationResultMediator;
 			if(!Mediator) {
				Mediator = new reqCalculationResultMediator(view.reqCalculation);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
			} 
			Mediator.resultListLoad();
 		}
 		
 		//세액계산하기
 		private function simulViewOpen(event:Event):void{
 			//view.vsMainView.selectedIndex = 2;
 			
 			var Mediator:reqCalculationResultMediator = facade.retrieveMediator(reqCalculationResultMediator.NAME) as reqCalculationResultMediator;
 			if(!Mediator) {
				Mediator = new reqCalculationResultMediator(view.reqCalculation);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
				//Mediator.scrollPosition();
			} 
			Mediator.simulListLoad();
 		}
 		
 		//LIST 조회
 		private function onSelectMainData():void{
 			var yearEndadjustProx:YearAdjustmentProxy = facade.retrieveProxy(YearAdjustmentProxy.NAME) as YearAdjustmentProxy;
 			yearEndadjustProx.load(Variables.yearPernr);	
 		}
 		
 		
 		
 		private function onSummaryMediatorCall(evnet:Event):void{ 
 			var Mediator:reqSummaryMediator = facade.retrieveMediator(reqSummaryMediator.NAME) as reqSummaryMediator;
 			if(!Mediator) {
				Mediator = new reqSummaryMediator(view.reqSummary);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
			} 
		}

 		//총소득공제  메디에이터 등록
 		private function onTotalIncomeMediatorCall(evnet:Event):void{ 
 			var Mediator:reqTotalIncomeMediator = facade.retrieveMediator(reqTotalIncomeMediator.NAME) as reqTotalIncomeMediator;
 			if(!Mediator) {
				Mediator = new reqTotalIncomeMediator(view.reqTotalIncome);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
			} 
		}
		
		//인적기본공제 메디에이터 등록
 		private function onBasicSubtrationMediatorCall(evnet:Event):void{
 			var Mediator:reqBasicSubtractionMediator = facade.retrieveMediator(reqBasicSubtractionMediator.NAME) as reqBasicSubtractionMediator;
 			
 			if(!Mediator) {
				Mediator = new reqBasicSubtractionMediator(view.reqBasicSubtraction);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
			}
		}
		
		//주택자금 공제
 		private function onHouseFundSubtrationMediatorCall(evnet:Event):void{
 			var Mediator:reqHouseFundSubtractionMediator = facade.retrieveMediator(reqHouseFundSubtractionMediator.NAME) as reqHouseFundSubtractionMediator;
 			
 			if(!Mediator) {
				Mediator = new reqHouseFundSubtractionMediator(view.reqHouseFundSubtraction);
	 			facade.registerMediator(Mediator);
			}else{
				Mediator.initView();
			}
		}
		
		//보험료공제
		private function onPremiumMediatorCall(event:Event):void
		{
			var Mediator:reqPremiumMediator = facade.retrieveMediator(reqPremiumMediator.NAME) as reqPremiumMediator;
			
			if(!Mediator){
				Mediator = new reqPremiumMediator(view.reqPremiumSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}
		//교육비공제
		private function onEducationalMediatorCall(event:Event):void
		{
			var Mediator:reqEducationalMediator = facade.retrieveMediator(reqEducationalMediator.NAME) as reqEducationalMediator;
			
			if(!Mediator){
				Mediator = new reqEducationalMediator(view.reqEducationalSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}
		
		//기부금 공제
		private function onDonationMediatorCall(event:Event):void
		{
			var Mediator:reqDonationMediator = facade.retrieveMediator(reqDonationMediator.NAME) as reqDonationMediator;
			
			if(!Mediator){
				Mediator = new reqDonationMediator(view.reqDonationSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}
		
		private function onAnnuitySavingMediatorCall(event:Event):void
		{
			var Mediator:reqAnnuitySavingMediator = facade.retrieveMediator(reqAnnuitySavingMediator.NAME) as reqAnnuitySavingMediator;
			
			if(!Mediator){
				Mediator = new reqAnnuitySavingMediator(view.reqAnnuitySaving);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}

		private function onHouseSavingMediatorCall(event:Event):void
		{
			var Mediator:reqHouseSavingMediator = facade.retrieveMediator(reqHouseSavingMediator.NAME) as reqHouseSavingMediator;
			
			if(!Mediator){
				Mediator = new reqHouseSavingMediator(view.reqHouseSaving);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}
		
		private function onCreditCardMediatorCall(event:Event):void
		{
			var Mediator:reqCreditCardMediator  = facade.retrieveMediator(reqCreditCardMediator.NAME) as reqCreditCardMediator;
			
			if(!Mediator){
				Mediator = new reqCreditCardMediator(view.reqCreditCard);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}

		private function onAnnuitySubtractionCall(event:Event):void
		{
			var Mediator:reqAnnuityMediator = facade.retrieveMediator(reqAnnuityMediator.NAME) as reqAnnuityMediator;
			
			if(!Mediator){
				Mediator = new reqAnnuityMediator(view.reqAnnuitySubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}

//shgoo 2010.01.05 혼인,장례,이사비 공제 탭 삭제
/*			
		//혼인,장례,이사비 공제
		private function onMarriageMediatorCall(event:Event):void
		{
			var Mediator:reqMarriageMediator = facade.retrieveMediator(reqMarriageMediator.NAME) as reqMarriageMediator;
			
			if(!Mediator){
				Mediator = new reqMarriageMediator(view.reqMarriageSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}

		}
*/
		
		//기타소득공제
		private function onOtherSubtractionMediatorCall(event:Event):void
		{
			trace("OTHER MEDIATOR");
			var Mediator:reqOtherSubtractionMediator = facade.retrieveMediator(reqOtherSubtractionMediator.NAME) as reqOtherSubtractionMediator;
			
			if(!Mediator){
				Mediator = new reqOtherSubtractionMediator(view.reqOtherSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}

		//세액감면
		private function onAmountReductionMediatorCall(event:Event):void
		{
			var Mediator:reqAmountReductionMediator = facade.retrieveMediator(reqAmountReductionMediator.NAME) as reqAmountReductionMediator;
			
			if(!Mediator){
				Mediator = new reqAmountReductionMediator(view.reqAmountReduction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}
		
		//의료비공제 팝업
		private function onreqMedicalSubtractionMediatorCall(event:Event):void
		{
			var Mediator:reqMedicalSubtractionMediator = facade.retrieveMediator(reqMedicalSubtractionMediator.NAME) as reqMedicalSubtractionMediator;
			
			if(!Mediator) {
				Mediator = new reqMedicalSubtractionMediator(view.reqMedicalSubtraction);
				facade.registerMediator(Mediator);
			} else {
				Mediator.initView();
			}
		}

		private var dlgPrint:IFlexDisplayObject = null;
//ywshin 2011.1.3		
		private function onPrintReport(e:Event):void
		{
 			var addCheck:String = view.reqSummary.address.fulladdress;
 			addCheck = StringUtil.trim(addCheck);
 			if(addCheck == null || addCheck == '') {
 				Alert.show('주민등록주소를 사전에 입력하시기 바랍니다');
 				return;
 			}
 						
			if(dlgPrint == null) {
				dlgPrint = PopUpManager.createPopUp(view, popPrintReport, true);
				PopUpManager.centerPopUp(dlgPrint);
				setDlgPrintEvents();
				
			}
			else {
				PopUpManager.addPopUp(dlgPrint, view, true);
			}
			popPrintReport(dlgPrint).y = 150;
		}
		
		private function setDlgPrintEvents():void
		{
			dlgPrint.addEventListener(popPrintReport.INCOME_REPORT_CALL1, onIncomeReport);
			dlgPrint.addEventListener(popPrintReport.INCOME_REPORT_CALL2, onIncomeReport2);
			dlgPrint.addEventListener(popPrintReport.INCOME_REPORT_CALL3, onIncomeReport3);
			dlgPrint.addEventListener(popPrintReport.INCOME_REPORT_CALL7, onIncomeReport7);
			dlgPrint.addEventListener(popPrintReport.CREDIT_CARD_REPORT_CALL, onCreditCardReport);
			dlgPrint.addEventListener(popPrintReport.MEDICAL_REPORT_CALL, onMedicalReport);
			dlgPrint.addEventListener(popPrintReport.DONATION_REPORT_CALL, onDonationReport);
			//fnu
			dlgPrint.addEventListener(popPrintReport.PRESENT_REPORT_CALL, onPresentReport);
		}

//shgoo 2010.01.14		
		private var waitinPage:int = 0;
		//소득공제  신고서 (1Page) 버튼 클릭 이벤트
		private function onIncomeReport(event:Event):void {
			b1Page = true;
			waitinPage = 1;
 			var proxy:IncomeReportProxy = facade.retrieveProxy(IncomeReportProxy.NAME) as IncomeReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear); 
		}
		//소득공제  신고서 (2Page) 버튼 클릭 이벤트
		private function onIncomeReport2(event:Event):void {
			b1Page = false;
			waitinPage = 2;
 			var proxy:IncomeReportProxy = facade.retrieveProxy(IncomeReportProxy.NAME) as IncomeReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}
		//소득공제  신고서 (3Page) 버튼 클릭 이벤트
		private function onIncomeReport3(event:Event):void {
			b1Page = false;
			waitinPage = 3;
 			var proxy:IncomeReportProxy = facade.retrieveProxy(IncomeReportProxy.NAME) as IncomeReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}
		//소득공제  신고서 (7Page) 버튼 클릭 이벤트
		private function onIncomeReport7(event:Event):void {
			b1Page = false;
			waitinPage = 7;
 			var proxy:IncomeReportProxy = facade.retrieveProxy(IncomeReportProxy.NAME) as IncomeReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}

		//신용카드 명세서 버튼 클릭 이벤트
		private function onCreditCardReport(event:Event):void {
 			var proxy:CreditCardReportProxy = facade.retrieveProxy(CreditCardReportProxy.NAME) as CreditCardReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}

		//의료비명세서 버튼 클릭 이벤트
		private function onMedicalReport(event:Event):void {
 			var proxy:MedicalReportProxy = facade.retrieveProxy(MedicalReportProxy.NAME) as MedicalReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}

		//기부금 버튼 클릭 이벤트 
		private function onDonationReport(event:Event):void {
 			var proxy:DonationReportProxy = facade.retrieveProxy(DonationReportProxy.NAME) as DonationReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}
		
		//제출서류안내 fnu
		private function onPresentReport(event:Event):void{
			var proxy:PresentReportProxy = facade.retrieveProxy(PresentReportProxy.NAME) as PresentReportProxy;
 			proxy.load(Variables.yearPernr, view.selYear);
		}		
/////////////////////

		///////////////////////////////////////////////////////////////////////////////////////////////////
		//
		//	Process MVC Messages
		//
		///////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		* 본 Class에서 처리해야할 Noti들을 등록한다.
		* 
		* @param
		* @return void
		*/
		override public function listNotificationInterests():Array 
		{
			return basicInterestMessages.concat( [
					YearAdjustmentFacade.LOAD_PRESENT_REPORT_COMPLETE,
					YearAdjustmentFacade.LOAD_PRESENT_REPORT_FAILED,			
					YearAdjustmentFacade.LOAD_MAINLIST_COMPLETE,
					YearAdjustmentFacade.LOAD_MAINLIST_FAILED,
					YearAdjustmentFacade.SAVE_MAINDATA_COMPLETE,
					YearAdjustmentFacade.SAVE_MAINDATA_FAILED,
					YearAdjustmentFacade.LOAD_BASICINFO_COMPLETE,
					YearAdjustmentFacade.LOAD_BASICINFO_FAILED,
					YearAdjustmentFacade.LOAD_CULTRESULT_COMPLETE,
					YearAdjustmentFacade.LOAD_CULTRESULT_FAILED,
					YearAdjustmentFacade.LOAD_SIMULRESULT_COMPLETE,
					YearAdjustmentFacade.LOAD_SIMULRESULT_FAILED,
					YearAdjustmentFacade.DETAIL_VIEW,
					YearAdjustmentFacade.LOAD_BASIC_SUBTRACTIONCNT_COMPLETE,
					YearAdjustmentFacade.LOAD_BASIC_SUBTRACTIONCNT_FAILED,
					YearAdjustmentFacade.RELOAD_BASIC_DATA,
					YearAdjustmentFacade.LOAD_INCOME_REPORT_COMPLETE,
					YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED,
					YearAdjustmentFacade.LOAD_CREDIT_CARD_REPORT_COMPLETE,
					YearAdjustmentFacade.LOAD_CREDIT_CARD_REPORT_FAILED,
					YearAdjustmentFacade.LOAD_DONATION_REPORT_COMPLETE,
					YearAdjustmentFacade.LOAD_DONATION_REPORT_FAILED,
					YearAdjustmentFacade.LOAD_MEDICAL_REPORT_COMPLETE,
					YearAdjustmentFacade.LOAD_MEDICAL_REPORT_FAILED,
					YearAdjustmentView.CHECK_REQ_OTHERSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_AMOUNTREDUCTION,
					YearAdjustmentView.CHECK_REQ_TOTALINCOME,
					YearAdjustmentView.CHECK_REQ_BASICSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_ADDITIONSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_ANNUITYSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_PREMIUMSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_MEDICALSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_EDUCATIONALSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_HOUSEFUNDSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_DONATIONSUBTRACTION,
					YearAdjustmentView.CHECK_REQ_MARRIAGESUBTRACTION,
					PrintPaperProxy.LOAD_PRINT_PAPER_COMPLETE,
					PrintPaperProxy.LOAD_PRINT_PAPER_FAILED,
					AddressProxy.LOAD_ADDRESS_COMPLETE,
					AddressProxy.LOAD_ADDRESS_FAILED
					]);
		}
		

		/**
		* Noti별로 처리한다.
		* 
		* @param
		* @return void
		*/
		override public function handleNotification(note:INotification):void
		{
			super.handleNotification(note);
			switch(note.getName()) 
			{
				case Messages.ACTIVATE_MODULE:
					onSelectMainData();
					trace("ActiveModule at YearAdjustmentViewMediator");
					bActivated = true;
					break;
				case Messages.QUERY_CLOSE_MODULE:
					if(bDirty)
						onQueryCloseModule();
					else
						 mainFacade.sendNotification(Messages.ADMIT_CLOSE_MODULE, this);
					break;
				case Messages.CLOSE_MODULE:
					bActivated = false;
					clearView();
					break;
				case YearAdjustmentFacade.LOAD_MAINLIST_COMPLETE:
					//Alert.show("LOAD_MAINLIST_COMPLETE: " + (note.getBody() as YearAdjustmentProxy).mainList.length);
					view.mainList = (note.getBody() as YearAdjustmentProxy).mainList;
					//setStatusMessage("데이터가 정상적으로 로드되었습니다.");
					break;
				case YearAdjustmentFacade.LOAD_MAINLIST_FAILED:
					trace("YearAdjustmentFacade.LOAD_MAINLIST_FAILED");
					//setStatusMessage("데이터를 로드하는데 실패하였습니다.");
					break;	
				case YearAdjustmentFacade.SAVE_MAINDATA_COMPLETE:
					//view.vsMainView.selectedIndex = 0;
					//onSelectMainData();
					view.isModify(YearAdjustmentView.CHECK_REQ_CLEAN);
					onSelectMainData();
					PsHrAlert.showMessage("저장완료");
					break;
				case YearAdjustmentFacade.SAVE_MAINDATA_FAILED:
					trace("YearAdjustmentFacade.SAVE_MAINLIST_FAILED");
					//returnAmt();
					//setStatusMessage("데이터를 저장하는데 실패하였습니다.");
					break;	
				case AddressProxy.LOAD_ADDRESS_FAILED:
					PsHrAlert.showMessage((note.getBody() as AddressProxy).retText);
					break;						
				case YearAdjustmentFacade.RELOAD_BASIC_DATA:
					detailDataLoad(view.selYear);
					break;
				case YearAdjustmentFacade.LOAD_BASICINFO_COMPLETE:
					view.modifyMsg = (note.getBody() as BasicViewInfoProxy).modifyMsg;
					view.totalincomeVo = (note.getBody() as BasicViewInfoProxy).totalincomeVo;
					view.basicsubtractionVo = (note.getBody() as BasicViewInfoProxy).basicsubtractionVo;
					view.additionVo = (note.getBody() as BasicViewInfoProxy).additionVo;
					view.annuityVo = (note.getBody() as BasicViewInfoProxy).annuityVo;
					view.premiumVo = (note.getBody() as BasicViewInfoProxy).premiumVo;
					view.medicalVo = (note.getBody() as BasicViewInfoProxy).medicalVo;
					view.educationalData = (note.getBody() as BasicViewInfoProxy).educationalData;
					view.houseFundVo = (note.getBody() as BasicViewInfoProxy).houseFundVo;
					//PsHrAlert.showMessage("repay = " + view.houseFundVo.REPAY_F);
					view.donationVo = (note.getBody() as BasicViewInfoProxy).donationVo;
					view.marriageVo = (note.getBody() as BasicViewInfoProxy).marriageVo;
					view.otherSubtractionVo = (note.getBody() as BasicViewInfoProxy).otherSubtractionVo;
					view.amountReductionVo = (note.getBody() as BasicViewInfoProxy).amountReductionVo;
					break;
				case YearAdjustmentFacade.LOAD_BASICINFO_FAILED:
					trace("YearAdjustmentFacade.LOAD_BASICINFO_FAILED");
					break;
				case YearAdjustmentFacade.DETAIL_VIEW:
					if(resultViewMsg == "main"){
						view.vsMainView.selectedIndex = 0;
					}else{
						view.vsMainView.selectedIndex = 1;
					}
					break;	
				case YearAdjustmentFacade.LOAD_BASIC_SUBTRACTIONCNT_COMPLETE:
					view.basicsubtractionVo = (note.getBody() as BasicSubtractionProxy).humanSubTractionCnt;
					view.additionVo = (note.getBody() as BasicSubtractionProxy).additionCnt;
					break;
				case YearAdjustmentFacade.LOAD_BASIC_SUBTRACTIONCNT_FAILED:
					trace("YearAdjustmentFacade.LOAD_BASIC_SUBTRACTIONCNT_FAILED");
					break;	
				case YearAdjustmentFacade.LOAD_CULTRESULT_COMPLETE:
					view.vsMainView.selectedIndex = 2;
					view.resultValList = (note.getBody() as CalculationResultProxy).resultList;
					break;
				case YearAdjustmentFacade.LOAD_CULTRESULT_FAILED:
					PsHrAlert.showMessage((note.getBody() as CalculationResultProxy).msgStr);
					break;	
				case YearAdjustmentFacade.LOAD_SIMULRESULT_COMPLETE:
					view.vsMainView.selectedIndex = 2;
					view.resultValList = (note.getBody() as CalculationResultProxy).resultList;
					break;
				case YearAdjustmentFacade.LOAD_SIMULRESULT_FAILED:
					PsHrAlert.showMessage((note.getBody() as CalculationResultProxy).msgStr);
					break;	
//shgoo 2010.01.15					
				case YearAdjustmentFacade.LOAD_INCOME_REPORT_COMPLETE:
					//소득공제 신고서 출력 창 표시
//					showIncomeReport((note.getBody() as IncomeReportProxy).myInfo, 
//									(note.getBody() as IncomeReportProxy).myFamily,
//									(note.getBody() as IncomeReportProxy).myEmployee, 
//									(note.getBody() as IncomeReportProxy).myCompany,
//									(note.getBody() as IncomeReportProxy).myPNS1,
//									(note.getBody() as IncomeReportProxy).myPNS2,
//									(note.getBody() as IncomeReportProxy).myPNS3,
//									(note.getBody() as IncomeReportProxy).myPNS4);
					onNotePrint((note.getBody() as IncomeReportProxy).url);
					break;
				case YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED:
					PsHrAlert.showMessage((note.getBody() as IncomeReportProxy).msgStr);
					break;

				case YearAdjustmentFacade.LOAD_PRESENT_REPORT_COMPLETE:
					showPresentReport((note.getBody() as PresentReportProxy).present);				
					break;
				case YearAdjustmentFacade.LOAD_PRESENT_REPORT_FAILED:
					PsHrAlert.showMessage((note.getBody() as PresentReportProxy).msgStr);
					break;
										
//////////////////////
//shgoo 2010.01.17					
				case YearAdjustmentFacade.LOAD_CREDIT_CARD_REPORT_COMPLETE:
					//신용카드 명세서  출력 창 표시
					//2013
					//showCreditCardReport((note.getBody() as CreditCardReportProxy).card);
					showCreditCardReport((note.getBody() as CreditCardReportProxy).url);
					
					break;
				case YearAdjustmentFacade.LOAD_CREDIT_CARD_REPORT_FAILED:
					PsHrAlert.showMessage((note.getBody() as CreditCardReportProxy).msgStr);
					break;
////////////////////////
//shgoo 2010.01.17					
				case YearAdjustmentFacade.LOAD_DONATION_REPORT_COMPLETE:
					//기부금 명세서 출력 창 표시
					showDonationReport((note.getBody() as DonationReportProxy).donation);
					break;
				case YearAdjustmentFacade.LOAD_DONATION_REPORT_FAILED:
					PsHrAlert.showMessage((note.getBody() as DonationReportProxy).msgStr);
					break;
				case YearAdjustmentFacade.LOAD_MEDICAL_REPORT_COMPLETE:
					//의교비지급명세서 출력 창 표시
					showMedicalReport((note.getBody() as MedicalReportProxy).medical);
					break;
				case YearAdjustmentFacade.LOAD_MEDICAL_REPORT_FAILED:
					PsHrAlert.showMessage((note.getBody() as MedicalReportProxy).msgStr);
					break;
				case AddressProxy.LOAD_ADDRESS_COMPLETE:
					view.reqSummary.address = (note.getBody() as AddressProxy).addressData; 
					break;
///////////////////////					
				case YearAdjustmentView.CHECK_REQ_OTHERSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_OTHERSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_AMOUNTREDUCTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_AMOUNTREDUCTION);
					break;	
				case YearAdjustmentView.CHECK_REQ_TOTALINCOME:
					view.isModify(YearAdjustmentView.CHECK_REQ_TOTALINCOME);
					break;
				case YearAdjustmentView.CHECK_REQ_BASICSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_BASICSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_ADDITIONSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_ADDITIONSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_ANNUITYSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_ANNUITYSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_PREMIUMSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_PREMIUMSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_MEDICALSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_MEDICALSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_EDUCATIONALSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_EDUCATIONALSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_HOUSEFUNDSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_HOUSEFUNDSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_DONATIONSUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_DONATIONSUBTRACTION);
					break;
				case YearAdjustmentView.CHECK_REQ_MARRIAGESUBTRACTION:
					view.isModify(YearAdjustmentView.CHECK_REQ_MARRIAGESUBTRACTION);
					break;
				case PrintPaperProxy.LOAD_PRINT_PAPER_COMPLETE:
					printPaper((note.getBody() as PrintPaperProxy).url);
					break;
				case PrintPaperProxy.LOAD_PRINT_PAPER_FAILED:
					PsHrAlert.showMessage((note.getBody() as PrintPaperProxy).msgStr);
					break;
				default:
					//trace(this.instanceID+"에서 처리 안된 Noti가 검출됨 : " + note.getBody());
					break;
			}
		}

		//소득공제신고서 출력 창 표시
		private function showIncomeReport(arrInfo:ArrayCollection, 
											arrFamily:ArrayCollection, 
											arrEmployee:ArrayCollection, 
											arrCompany:ArrayCollection,
											arrPns1:ArrayCollection,
											arrPns2:ArrayCollection,
											arrPns3:ArrayCollection,
											arrPns4:ArrayCollection):void {	
          	var params:URLVariables = new URLVariables();
          
          	switch(waitinPage) {
          		case 1:
		          	parseMyInfo(arrInfo, params);			//인적공제 항목에 해당하는 인원수 및 각종 소득공제 합계, 근로자 본인 소득공제항목
		          	parseMyFamily(arrFamily, params);		//가족 소득공제 항목
		          	parseMyEmployee(arrEmployee, params);	//근무 관련 항목
		          	parseMyCompany(arrCompany, params);		//회사 관련 항목
		          	view.openNavigateToURL("IncomeReport.jsp", params);
          			break;
          		case 2:
	          		parseMyInfo2(arrInfo, params);			//인적공제 항목에 해당하는 인원수 및 각종 소득공제 합계, 근로자 본인 소득공제항목
	    	      	view.openNavigateToURL("IncomeReport2.jsp", params);
          			break;
          		case 3:
	          		parseMyInfo3(arrInfo, params);			//인적공제 항목에 해당하는 인원수 및 각종 소득공제 합계, 근로자 본인 소득공제항목
		          	parseMyEmployee3(arrEmployee, params);	//근무 관련 항목
	    	      	view.openNavigateToURL("IncomeReport3.jsp", params);
          			break;
          		case 7:
		          	parseMyCompany7(arrCompany, params);		//회사 관련 항목
		          	parseMyEmployee7(arrEmployee, params);	//근무 관련 항목
		          	parseMyPns7(arrPns1,arrPns2, arrPns3, arrPns4, params);
	    	      	view.openNavigateToURL("IncomeReport7.jsp", params);
          			break;
          	}
          	waitinPage = 0;
          	/*
          	if(!b1Page) {	//소득공제 신고서 (2Page)가 클릭 된경우
          		
 				return;          		
          	}
          	
          	*/
		
		}

		//신용카드 소득공제 출력 창 표시
		//private function showCreditCardReport(card:URLVariables):void {
		private function showCreditCardReport(url:String):void {
          	//창표시
          	//view.openNavigateToURL("CreditCardReport.jsp", card);
          	//2013
			var req:URLRequest = new URLRequest("../yea_card/"+url);			
			navigateToURL(req);
		}

		private function showPresentReport(present:URLVariables):void{
			view.openNavigateToURL("PresentReport.jsp", present);
		}
				
		//기부금 명세서 출력 창 표시
		private function showDonationReport(donation:URLVariables):void {
          	//창표시
          	view.openNavigateToURL("DonationReport.jsp", donation);
		}	
		
		//의표비지급명세서 출력 창 표시	
		private function showMedicalReport(medical:URLVariables):void {
          	//창표시
          	view.openNavigateToURL("MedicalReport.jsp", medical);
		}
		
		private function onNotePrint(url:String):void
		{ 
			//2013
			var req:URLRequest = new URLRequest("../yea_ded/"+url);			
			navigateToURL(req);
		}
		
		/**
         * 인적공제 및 소득공제 명세 1Page
         *  - 인적공제 항목에 해당하는 인원수 및 각종 소득공제 합계
         *  - 근로자 본인 소득공제항목
		 * 
		 * @param 	arrData	근로자본인 소득공제
		 * @return void
		 */
		private function parseMyInfo(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:IncomeReportVO in arrData) {
	          	/**
	          	 * 인적공제 및 소득공제 명세
	          	 *  - 인적공제 항목에 해당하는 인원수 및 각종 소득공제 합계
	          	 */
	          	//기본공제 인원수
	          	params["I_TOT_BASNO"] = rec.TOT_BASNO;
	          	//부녀자공제 인원수
	          	params["I_TOT_WOMNO"] = rec.TOT_WOMNO;
				//경로우대 인원수
				params["I_TOT_AGENO"] = rec.TOT_AGENO;
				//출산입양자 공제 인원수
				params["I_TOT_ADONO"] = rec.TOT_ADONO;
				//장애인 공제 인원수
				params["I_TOT_HANNO"] = rec.TOT_HANNO;
				//자녀양육비 공제 인원수
				params["I_TOT_CLDNO"] = rec.TOT_CLDNO;
	          	//국세청 보험료
    	      	params["I_TOT_NTINS"] = rec.TOT_NTINS;
	          	//기타 보험료
    	      	params["I_TOT_OTINS"] = rec.TOT_OTINS;
    	      	//국세청 의료비
    	      	params["I_TOT_NTMED"] = rec.TOT_NTMED;
    	      	//기타 의료비
    	      	params["I_TOT_OTMED"] = rec.TOT_OTMED;
    	      	//국세청 교육비
    	      	params["I_TOT_NTEDU"] = rec.TOT_NTEDU;
    	      	//기타 교육비
    	      	params["I_TOT_OTEDU"] = rec.TOT_OTEDU;
    	      	//국세청 신용카드
    	      	params["I_TOT_NTCRE"] = rec.TOT_NTCRE;
    	      	//기타 신용카드
    	      	params["I_TOT_OTCRE"] = rec.TOT_OTCRE;
    	      	//국세청 직불카드
    	      	params["I_TOT_NTDBT"] = rec.TOT_NTDBT;
    	      	//기타 직불카드
    	      	params["I_TOT_OTDBT"] = rec.TOT_OTDBT;
    	      	//국세청 현금영수증
    	      	params["I_TOT_NTCAS"] = rec.TOT_NTCAS;
    	      	//기타 현금영수증
    	      	params["I_TOT_OTCAS"] = rec.TOT_OTCAS;
    	      	//국세청 기부금
    	      	params["I_TOT_NTDON"] = rec.TOT_NTDON;
    	      	//기타 기부금
    	      	params["I_TOT_OTDON"] = rec.TOT_OTDON;
				

	          	/**
	          	 * 인적공제 및 소득공제 명세 근로자 본인
	          	 *  - 근로자 본인
	          	 */
	          	 
				//관계코드 
	          	params["I_EE_RELCO"] = rec.EE_RELCO;
				//내/외국인 구분
	          	params["I_EE_NATIO"] = rec.EE_NATIO;
	          	//성명
	          	params["I_EE_FNAME"] = rec.EE_FNAME;

				params["I_EE_DPTID"] = rec.EE_DPTID;
				params["I_EE_WOMEE"] = rec.EE_WOMEE;
				params["I_EE_HNDID"] = rec.EE_HNDID;
				params["I_EE_OLDID"] = rec.EE_OLDID;
				params["I_EE_CHDID"] = rec.EE_CHDID;

	          	//국세청 보험료
    	      	params["I_EE_NTINS"] = rec.EE_NTINS;
	          	//기타 보험료
    	      	params["I_EE_OTINS"] = rec.EE_OTINS;
    	      	//국세청 의료비
    	      	params["I_EE_NTMED"] = rec.EE_NTMED;
    	      	//기타 의료비
    	      	params["I_EE_OTMED"] = rec.EE_OTMED;
    	      	//국세청 교육비
    	      	params["I_EE_NTEDU"] = rec.EE_NTEDU;
    	      	//기타 교육비
    	      	params["I_EE_OTEDU"] = rec.EE_OTEDU;
    	      	//국세청 신용카드
    	      	params["I_EE_NTCRE"] = rec.EE_NTCRE;
    	      	//기타 신용카드
    	      	params["I_EE_OTCRE"] = rec.EE_OTCRE;
    	      	//국세청 직불카드
    	      	params["I_EE_NTDBT"] = rec.EE_NTDBT;
    	      	//기타 직불카드
    	      	params["I_EE_OTDBT"] = rec.EE_OTDBT;
    	      	//국세청 현금영수증
    	      	params["I_EE_NTCAS"] = rec.EE_NTCAS;
    	      	//기타 현금영수증
    	      	params["I_EE_OTCAS"] = rec.EE_OTCAS;
    	      	//국세청 기부금
    	      	params["I_EE_NTDON"] = rec.EE_NTDON;
    	      	//기타 기부금
    	      	params["I_EE_OTDON"] = rec.EE_OTDON;

    	      	
          	}
		}

		/**
         * 소득공제 명세 2Page
		 *  - 특별공제, 그밖의 공제, 세액 공제
		 * 
		 * @param 	arrData	
		 * @return void
		 */
		private function parseMyInfo2(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:IncomeReportVO in arrData) {
				//2012.0104 주택임차차입금, 장기주택저당차입금 수정
				params["I_DED_PAID_01"] = rec.DED_PAID_01;
				params["I_DED_PAID_02"] = rec.DED_PAID_02;
				
				params["I_DED_LOAN_01"] = rec.DED_LOAN_01;
				params["I_DED_LOAN_02"] = rec.DED_LOAN_02;
				params["I_DED_LOAN_03"] = rec.DED_LOAN_03;
				
				
	          	//사번
	          	params["I_PERNR"] = rec.PERNR;
	          	//성명
	          	params["I_EE_FNAME"] = rec.EE_FNAME;
				
				//국민연금 보험료 - 종전근무지 - 금액
				params["I_NP_PRV"] = rec.NP_PRV;
				//국민연금 보험료 - 종전근무지 - 공제액
				params["I_DED_NP_PRV"] = rec.DED_NP_PRV;

				//국민연금 보험료 - 주(현)근무지 - 금액
				params["I_NP_CUR"] = rec.NP_CUR;
				//국민연금 보험료 - 주(현)근무지 - 공제액
				params["I_DED_NP_CUR"] = rec.DED_NP_CUR;

				//외의 연금보험료- 종전근무지 - 금액
				params["I_OP_PRV"] = rec.OP_PRV;
				//외의 연금보험료 - 종전근무지 - 공제액
				params["I_DED_OP_PRV"] = rec.DED_OP_PRV;

				//외의 연금보험료- 주(현)근무지 - 금액
				params["I_OP_CUR"] = rec.OP_CUR;
				//외의 연금보험료 - 주(현)근무지 - 공제액
				params["I_DED_OP_CUR"] = rec.DED_OP_CUR;

				//퇴직연금- 종전근무지 - 금액
				params["I_RP_PRV"] = rec.RP_PRV
				//퇴직연금 - 종전근무지 - 공제액
				params["I_DED_RP_PRV"] = rec.DED_RP_PRV;

				//퇴직연금- 주(현)근무지 - 금액
				params["I_RP_CUR"] = rec.RP_CUR;
				//퇴직연금 - 주(현)근무지 - 공제액
				params["I_DED_RP_CUR"] = rec.DED_RP_CUR;

				//연금 보험료 계- 주(현)근무지 - 금액
				params["I_TOTAL_PEN"] = rec.TOTAL_PEN;
				//연금 보험료 계 - 주(현)근무지 - 공제액
				params["I_DED_TOTAL_PEN"] = rec.DED_TOTAL_PEN;

				

	          	// - 보험료
				params["I_MED_INS_PRV"] = rec.MED_INS_PRV;		//국민건강보험-종(전)근무지  - 금액
				params["I_DED_MED_PRV"] = rec.DED_MED_PRV;		//국민건강보험-종(전)근무지  - 공제액	
				params["I_MED_INS_CUR"] = rec.MED_INS_CUR;		//국민건강보험-주(현)근무지 - 금액
				params["I_DED_MED_CUR"] = rec.DED_MED_CUR;		//국민건강보험-주(현)근무지  - 공제액

				params["I_DED_EI_PRV"] = rec.DED_EI_PRV;		//고용보험 - 종(전) 근무지 - 금액
				params["I_P12"] = rec.P12						//고용보험 - 종(전) 근무지 - 공제액
				params["I_DED_EI_CUR"] = rec.DED_EI_CUR;		//고용보험 - 주(현) 근무지 - 금액	
				params["Y44"] = rec.Y44;						//고용보험 - 주(현) 근무지  - 공제액
				
				params["I_DED_SI"] = rec.DED_SI;				//일반보장성 보험 - 금액
				params["Y4A"] = rec.Y4A;						//일반보장성 보험   - 공제액

				params["I_DED_SI_DIS"] = rec.DED_SI_DIS;		//장애인 전용 보장성 보험 - 금액
				params["I_Y4B"] = rec.Y4B;						//장애인 전용 보장성 보험  - 공제액
				
				params["I_DED_SI_TOT"] = rec.DED_SI_TOT;		//보헙료 계 - 금액	
				params["I_Y4C"] = rec.Y4C;						//보헙료 계 - 공제액

				//의료비
				params["I_Y4E"]			= rec.Y4E;				//본인 의료비
				params["I_DED_MED_AGED"]	= rec.DED_MED_AGED;		//본인 의료비 - 공제액
				params["I_Y4F"]			= rec.Y4F;				//그 밖의 공제대상자 의료비
				params["I_DED_MED_DEP"]	= rec.DED_MED_DEP;		//그 밖의 공제대상자 의료비- 공제액
				params["I_DED_MED_TOT"]	= rec.DED_MED_TOT;		//의표비 계
				params["I_Y4H"]			= rec.Y4H;				//의표비 계- 공제액
				
	          	 //* 교육비
				params["I_DED_EDU_EE"]	= rec.DED_EDU_EE;		// 소득자 본인 공납금
				params["I_Y4K"]			= rec.Y4K;				// 소득자 본인 공납금 - 공제액
	          	 
				params["I_DED_ELM_PER"]	= rec.DED_ELM_PER;	//취학전 아동 인원수
				params["I_DED_EDU_ELM"]	= rec.DED_EDU_ELM;	//취학전 아동 (유치원비, 학원비등)
				params["I_Y4O"]			= rec.Y4O;			//취학전 아동 (유치원비, 학원비등) - 공제액
	          	 
				params["I_DED_STU_PER"]	= rec.DED_STU_PER;	//초,중,고등학교 인원수
				params["I_DED_EDU_STU"]	= rec.DED_EDU_STU;	//초,중,고등학교 공납금
				params["I_Y4P"]			= rec.Y4P;			//초,중,고등학교 공납금 - 공제액
	          	 
				params["I_DED_UNI_PER"]	= rec.DED_UNI_PER;	//대학생  인원수
				params["I_DED_EDU_UNI"]	= rec.DED_EDU_UNI;	//대학생  공납금
				params["I_Y4Q"]			= rec.Y4Q;			//대학생  공납금 - 공제액

				params["I_DED_DIS_PER"]	= rec.DED_DIS_PER;	//장애인 인원수
				params["I_DED_EDU_DIS"]	= rec.DED_EDU_DIS;	//장애인 특수교육비
				params["I_Y4J"]			= rec.Y4J;			//장애인 특수교육비 - 공제액

				params["I_DED_EDU_TOT"]	= rec.DED_EDU_TOT;	//교육비 계
				params["I_Y4M"]			= rec.Y4M;			//교육비 계 - 공제액

	          	// 주택자금
				params["I_DED_HOUS_PAID"]	= rec.DED_HOUS_PAID;//주택임차차입금
				params["I_Y5L"]			= rec.Y5L;			//주택임차차입금- 공제액
				params["I_DED_RENT_FEE"]	= rec.DED_RENT_FEE; //월세액 
				params["I_Y68"]			= rec.Y68;			//월세액 - 공제액
				params["I_DED_HOUS_LOAN"]	= rec.DED_HOUS_LOAN; //장기주택저당차입금
				params["I_Y54"]			= rec.Y54;			//장기주택저당차입금 - 공제액
				params["I_Y5L_Y54_TOT"]	= rec.Y5L_Y54_TOT;	//주택자금 공제액 계 
	          	
	          	//기부금
				params["I_DED_DONA_POLI"]	= rec.DED_DONA_POLI;	//정치자금 기부금(세액공제분제외)
				params["I_DED_DONA_100"]	= rec.DED_DONA_100;	//법정 기부금 
				params["I_Y5N"]			= rec.Y5N;			//법정 기부금   - 공제액
				params["I_DED_DONA_SPETC"]= rec.DED_DONA_SPETC;	//특례기부금(공익법인신탁 제외)
				params["I_Y5V"]			= rec.Y5V;			//특례기부금(공익법인신탁 제외)   - 공제액
				params["I_DED_DONA_PC"]	= rec.DED_DONA_PC;	//공익법인신탁 특례기부금 
				params["I_DED_DONA_30"]	= rec.DED_DONA_30;	//우리사주조합 기부금 
				params["I_Y5Y"]			= rec.Y5Y;			//우리사주조합 기부금     - 공제액
				params["I_DED_DONA_DESIG"]= rec.DED_DONA_DESIG;	//종교단체외 지정 기부금
				params["I_DED_DONA_RELIG"]= rec.DED_DONA_RELIG;	//종교단체 지정 기부금
				params["I_Y5S"]			= rec.Y5S;			//기부금공제액 계
	          	
	          	
    	      	
          	}
		}

		/**
         * 소득공제 명세 3Page
		 *  - 특별공제, 그밖의 공제, 세액 공제
		 * 
		 * @param 	arrData	
		 * @return void
		 */
		private function parseMyInfo3(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:IncomeReportVO in arrData) {
				
	          	//사번
	          	params["I_PERNR"] = rec.PERNR;
	          	//성명
	          	params["I_EE_FNAME"] = rec.EE_FNAME;
				
	          	

	          	/**
	          	 * 그 밖의 공제 - 연금저축공제
	          	 */
				params["I_DED_PERS_P_B"] 	= rec.DED_PERS_P_B;	//2000년 이전 가입한 개인연금저축
				params["I_Y6I"] 				= rec.Y6I;			//2000년 이전 가입한 개인연금저축 - 공제액
				params["I_DED_PERS_P_A"] 	= rec.DED_PERS_P_A;	//2001년 이후 가입한 연금저축
				params["I_Y6Q"] 				= rec.Y6Q;			//2001년 이후 가입한 연금저축  - 공제액
				params["I_Y6Q_Y6I_TOT"] 		= rec.Y6Q_Y6I_TOT;	//연금저축공제 계 
		
	          	/**
	          	 * 그 밖의 공제 - 소기업, 소상공인 공제부금 소득공제
	          	 */
				params["I_DED_BIZ_FUND"] = rec.DED_BIZ_FUND;		//소기업, 소상공인 공제부금 소득공제			
				params["I_Y7U"] 		= rec.Y7U;		//소기업, 소상공인 공제부금 소득공제			
				
				
				//주택마련저축 소득 공제
				params["I_DED_HOUS_SAV_01"] = rec.DED_HOUS_SAV_01;		//청약저축 		
				params["I_DED_HOUS_SAV_04"] = rec.DED_HOUS_SAV_04;		//근로자주택마련저축 
				params["I_DED_HOUS_SAV_02"] = rec.DED_HOUS_SAV_02;		//주택청약종합저축 	
				params["I_DED_HOUS_SAV_03"] = rec.DED_HOUS_SAV_03;		//장기주택마련저축 
				params["I_DED_HOUS_SAV"] = rec.DED_HOUS_SAV;			//주택마련저축 소득공제 계 	
				params["I_Y5E"] = rec.Y5E;								//주택마련저축 소득공제 계 


				//투자조합 출자공제 
				params["I_INVEST_01"] = rec.INVEST_01;		//2008년 이전 출자ㆍ투자분 
				params["I_INVEST_02"] = rec.INVEST_02;		//2009년 이후 출자ㆍ투자분 	
				params["I_INVESTMENT"] = rec.INVESTMENT;;		//투자조합 출자공제- 출자 또는 투자
				params["I_DED_INVEST"] = rec.DED_INVEST;		//투자조합 출자공제- 출자 또는 투자
				
				
				
	          	/**
	          	 * 그 밖의 공제 - 신용카드 등 사용액 소득공제
	          	 */
				params["I_DED_CARD_01"] = rec.DED_CARD_01;	//신용카드 
				params["I_DED_CARD_02"] = rec.DED_CARD_02;	//직불카드
				params["I_DED_CRED_CASH"] = rec.DED_CRED_CASH;	//③ 현금영수증 
				params["I_DED_CRED_EXP"] = rec.DED_CRED_EXP;	//④ 학원비 지로납부 
				params["I_CRED_EXP_TOTAL"] = rec.CRED_EXP_TOTAL;	//계(①+②+③+④)  
				params["I_DED_CREDIT"] = rec.DED_CREDIT;	//계(①+②+③+④)   - 공제
				

				params["I_DED_EE_STOCK"] = rec.DED_EE_STOCK;		//우리사주 출연금
				params["I_Y6D"] = rec.Y6D;						//우리사주 출연금


	          	/**
	          	 * 그 밖의 공제 - 장기주식형 저축  소득공제
	          	 */
	          	//납입 1년차 
				params["I_DED_LTSF1"] = rec.DED_LTSF1;	
				//납입 2년차
				params["I_DED_LTSF2"] = rec.DED_LTSF2;	
				//납입 3년차
				params["I_DED_LTSF3"] = rec.DED_LTSF3;	  
				//납입 합계
				params["I_TOTAL_LTSF"] = rec.TOTAL_LTSF;
				//납입 합계
				params["I_Y7W"] 		= rec.Y7W;
				//고용유지 중소기업 소득공제
				params["I_DED_JKDED"] 	= rec.DED_JKDED;
				//고용유지 중소기업 소득공제
				params["I_Y78"] 		= rec.Y78;
				
				
				//국외원천소득 
				params["I_PRE_TAX_ABPAY"] 		= rec.PRE_TAX_ABPAY;
				//납세액(외화)
				params["I_PRE_TAX_FORCT"] 		= rec.PRE_TAX_FORCT;
				//납세액(원화)
				params["I_PRE_TAX_KORCR"] 		= rec.PRE_TAX_KORCR;
				//납세국명
				params["I_PRE_TAX_PAID"] 		= rec.PRE_TAX_PAID;
				//납부일 
				params["I_FRN_TAX_APP"] 		= rec.FRN_TAX_APP;
				//신청서제출일 
				params["I_PRE_TAX_DATE"] 		= rec.PRE_TAX_DATE;
				//국외근무처 
				params["I_FRN_TAX_WP"] 		= rec.FRN_TAX_WP;
				//근무기간
				params["I_PRE_TAX_DURA"] 		= rec.PRE_TAX_DURA;
				//근무기간
				params["I_FRN_TAX_JOB"] 		= rec.FRN_TAX_JOB;
				//주택자금 차입금 이자 세액공제
				params["I_TAX_HOME_INT"] 		= rec.TAX_HOME_INT;
				//주택자금 차입금 이자 세액공제
				params["I_Y7G"] 				= rec.Y7G;
				//기부정치자금 
				params["I_POL_DON"] 			= rec.POL_DON;
				//기부정치자금 
				params["I_Y7N"] 				= rec.Y7N;
				

				//일자
				params["I_SYS_DATE_YYYY"] = rec.SYS_DATE.substr(0, 4);
				params["I_SYS_DATE_MM"] = rec.SYS_DATE.substr(4, 2);
				params["I_SYS_DATE_DD"] = rec.SYS_DATE.substr(6, 2);

				//신고인 성명
				
	          	/**
	          	 * 세액 공제 - 외국인 근로자
	          	 */
				//외국인 근로자 단일세율적용신청서 제출여부 
				params["I_FLAT_RATE"] = rec.FLAT_RATE;
				//종(전) 근무자명
				params["I_DED_PRV_COMNM"] = rec.DED_PRV_COMNM;
				//사업자 등록번호
				params["I_DED_PRV_REGNO"] = rec.DED_PRV_REGNO.substr(0, 3) + "-" + rec.DED_PRV_REGNO.substr(3, 2) + "-" + rec.DED_PRV_REGNO.substr(5, 5);
				//종(전)급여총액
				params["I_DED_TOT_SALAR"] = rec.DED_TOT_SALAR;
				//종(전)결정세액
				params["I_DED_PRV_TAX"] = rec.DED_PRV_TAX;
				//종(전)근무지 근로소득원천 징수 영수증 제출여부
				params["I_PRV_RECEIPT"] = rec.PRV_RECEIPT;
    	      	
				params["I_PEN_SAV_INDIC"] 	= rec.PEN_SAV_INDIC;
				params["I_MED_INDIC"] 		= rec.MED_INDIC;
				params["I_DON_INDIC"] 		= rec.DON_INDIC;
          	}
		}
		/**
         * 인적공제 및 소득공제 명세
         *  - 가족들의 각종 소득공제
		 * 
		 * @param 	arrData	가족 소득공제
		 * @return void
		 */
		private function parseMyFamily(arrData:ArrayCollection, params:URLVariables):void {	
          	for ( var i:int = 0; i<arrData.length; ++i) {//FamilyReportVO
				//관계코드 
	          	params["F_RELCO" + i.toString()] = arrData[i].RELCO;
				//내/외국인 구분
	          	params["F_NATIO" + i.toString()] = arrData[i].NATIO;
	          	//성명
	          	params["F_FNAME" + i.toString()] = arrData[i].FNAME;
	          	//주민번호
	          	params["F_REGNO" + i.toString()] = (arrData[i].REGNO.substr(0, 6)) + "-" + (arrData[i].REGNO.substr(6)) ;
				//기본공제 체크 여부
	          	params["F_DPTID" + i.toString()] = arrData[i].DPTID;
				//부녀자공제 체크 여부
	          	params["F_WOMEE" + i.toString()] = arrData[i].WOMEE;
	          	//경로우대 공제 체크 여부
	          	params["F_OLDID" + i.toString()] = arrData[i].OLDID;
	          	//출산입양자 공제 체크 여부
	          	params["F_BACHD" + i.toString()] = arrData[i].BACHD;
	          	//장애인 공제 체크 여부
	          	params["F_HNDID" + i.toString()] = arrData[i].HNDID;
	          	//자녀양육비 공제 체크 여부
	          	params["F_CHDID" + i.toString()] = arrData[i].CHDID;
											
	          	
	          	//국세청 보험료
    	      	params["F_NTINS" + i.toString()] = arrData[i].NTINS;
	          	//기타 보험료
    	      	params["F_OTINS" + i.toString()] = arrData[i].OTINS;
    	      	//국세청 의료비
    	      	params["F_NTMED" + i.toString()] = arrData[i].NTMED;
    	      	//기타 의료비
    	      	params["F_OTMED" + i.toString()] = arrData[i].OTMED;
    	      	//국세청 교육비
    	      	params["F_NTEDU" + i.toString()] = arrData[i].NTEDU;
    	      	//기타 교육비
    	      	params["F_OTEDU" + i.toString()] = arrData[i].OTEDU;
    	      	//국세청 신용카드
    	      	params["F_NTCRE" + i.toString()] = arrData[i].NTCRE;
    	      	//기타 신용카드
    	      	params["F_OTCRE" + i.toString()] = arrData[i].OTCRE;
    	      	//국세청 직불카드
    	      	params["F_NTDBT" + i.toString()] = arrData[i].NTDBT;
    	      	//기타 직불카드
    	      	params["F_OTDBT" + i.toString()] = arrData[i].OTDBT;
    	      	//국세청 현금영수증
    	      	params["F_NTCAS" + i.toString()] = arrData[i].NTCAS;
    	      	//기타 현금영수증
    	      	params["F_OTCAS" + i.toString()] = arrData[i].OTCAS;
    	      	//국세청 기부금
    	      	params["F_NTDON" + i.toString()] = arrData[i].NTDON;
    	      	//기타 기부금
    	      	params["F_OTDON" + i.toString()] = arrData[i].OTDON;
          	}
  			//가족구성원 인원수
  			params["FAMILY_COUNT"] = arrData.length.toString();
  			
  		}

		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무정보
		 * 
		 * @param 	arrData	근로자 근무정보
		 * @return void
		 */
		private function parseMyEmployee(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:EmployeeReportVO in arrData) {
        		
				//소득자사번
	          	params["E_PERNR"] = rec.PERNR;
				//주민번호
	          	params["E_REGNO"] = rec.REGNO.substr(0, 6) + "-" + rec.REGNO.substr(6, 7);
	          	//성명
	          	params["E_ENAME"] = rec.ENAME;
				//거주구분
	          	params["E_RESIDENT"] = (rec.RESIDENT!= "") ? "O" : "&nbsp;&nbsp;&nbsp;&nbsp;";

				//근무기간 시작일
	          	if(rec.BEGDA.length >= 8)
		          	params["E_BEGDA"] = rec.BEGDA.substr(0, 4) + "." + rec.BEGDA.substr(4, 2) + "." + rec.BEGDA.substr(6, 2);
		        else
		        	params["E_BEGDA"] = "";
				//근무기간 종료일
	          	if(rec.ENDDA.length >= 8)
	          		params["E_ENDDA"] = rec.ENDDA.substr(0, 4) + "." + rec.ENDDA.substr(4, 2) + "." + rec.ENDDA.substr(6, 2);
				else
		        	params["E_ENDDA"] = "";
						          		
	          	//거주지국
	          	params["E_STATE"] = rec.STATE;
	          	if(params["E_STATE"] == "")		params["E_STATE"] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	          	//거주지국 코드
	          	params["E_STCOD"] = rec.STCOD;
	          	if(params["E_STCOD"] == "")		params["E_STCOD"] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        		
				//감면기간 시작일
	          	if(rec.EX_BEGDA.length >= 8)
		          	params["E_EX_BEGDA"] = rec.EX_BEGDA.substr(0, 4) + "." + rec.EX_BEGDA.substr(4, 2) + "." + rec.EX_BEGDA.substr(6, 2);
		        else
		        	params["E_EX_BEGDA"] = "";
				//감면기간 종료일
	          	if(rec.EX_ENDDA.length >= 8)
	          		params["E_EX_ENDDA"] = rec.EX_ENDDA.substr(0, 4) + "." + rec.EX_ENDDA.substr(4, 2) + "." + rec.EX_ENDDA.substr(6, 2);
				else
		        	params["E_EX_ENDDA"] = "";
	          	
	          	params["E_HSHLD"] = (rec.HSHLD!= "") ? "O" : "&nbsp;&nbsp;&nbsp;&nbsp;";
	          	//params["E_N_HSHLD"] = rec.N_HSHLD;
	          	params["E_COUNTRY"] = rec.COUNTRY;
	          	if(params["E_COUNTRY"] == "")		params["E_COUNTRY"] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	          	params["E_CURCD"] = rec.CURCD;
	          	if(params["E_CURCD"] == "")		params["E_CURCD"] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	          	params["E_PDCHG"] = (rec.PDCHG!= "") ? "O" : "&nbsp;&nbsp;&nbsp;&nbsp;";
	          	params["E_N_PDCHG"] = (rec.N_PDCHG!= "") ? "O" : "&nbsp;&nbsp;&nbsp;&nbsp;";
          	}
  		
  		}
		

		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무정보
		 * 
		 * @param 	arrData	근로자 근무정보
		 * @return void
		 */
		private function parseMyEmployee3(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:EmployeeReportVO in arrData) {
        		
				//소득자사번
	          	params["E_PERNR"] = rec.PERNR;
				//주민번호
	          	params["E_REGNO"] = rec.REGNO.substr(0, 6) + "-" + rec.REGNO.substr(6, 7);
	          	//성명
	          	params["E_ENAME"] = rec.ENAME;
				//거주구분
	          	params["E_SIGNATURE"] = rec.SIGNATURE;
				//근무기간 시작일
	          	if(rec.BEGDA.length >= 8)
		          	params["E_BEGDA"] = rec.BEGDA.substr(0, 4) + "." + rec.BEGDA.substr(4, 2) + "." + rec.BEGDA.substr(6, 2);
		        else
		        	params["E_BEGDA"] = "";
				//근무기간 종료일
	          	if(rec.ENDDA.length >= 8)
	          		params["E_ENDDA"] = rec.ENDDA.substr(0, 4) + "." + rec.ENDDA.substr(4, 2) + "." + rec.ENDDA.substr(6, 2);
				else
		        	params["E_ENDDA"] = "";
						          		
          	}
  		
  		}
		
		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무정보
		 * 
		 * @param 	arrData	근로자 근무정보
		 * @return void
		 */
		private function parseMyEmployee7(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:EmployeeReportVO in arrData) {
				//2012.01.04
	          	params["TEL"] = rec.TEL;
        		
				//소득자사번
	          	params["E_PERNR"] = rec.PERNR;
				//주민번호
	          	params["E_REGNO"] = rec.REGNO.substr(0, 6) + "-" + rec.REGNO.substr(6, 7);
	          	//성명
	          	params["E_ENAME"] = rec.ENAME;

	          	//⑤주 소
	          	params["E_ADDRE"] = rec.ADDRE;
          	}
  		
  		}
		
		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무처 정보
		 * 
		 * @param 	arrData	근로자 근무처 정보
		 * @return void
		 */
		private function parseMyCompany(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:CompanyReportVO in arrData) {
				//사번
	          	params["C_PERNR"] = parseInt(rec.PERNR) + '';
				//근무처명칭
	          	params["C_COMNM"] = rec.COMNM;
				//사업자 등록번호
	          	params["C_STCD2"] = rec.STCD2.substr(0, 3) + "-" + rec.STCD2.substr(3, 2) + "-" + rec.STCD2.substr(5, 5);
        		
          	}
  		
  		}
		
		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무처 정보
		 * 
		 * @param 	arrData	근로자 근무처 정보
		 * @return void
		 */
		private function parseMyCompany7(arrData:ArrayCollection, params:URLVariables):void {	
          	for each ( var rec:CompanyReportVO in arrData) {
          		//전번 2012
          		params["AG_TELNR"] = rec.AG_TELNR;
          		
				//사번
	          	params["C_PERNR"] = parseInt(rec.PERNR) + '';
				//근무처명칭
	          	params["C_COMNM"] = rec.COMNM;
				//사업자 등록번호
	          	params["C_STCD2"] = rec.STCD2.substr(0, 3) + "-" + rec.STCD2.substr(3, 2) + "-" + rec.STCD2.substr(5, 5);
        		
				//⑥사업장소재지
	          	params["C_ADDRESS_LINE"] = rec.ADDRESS_LINE;
           	}
  		
  		}
		/**
         * 인적공제 및 소득공제 명세
         *  - 근로자 근무처 정보
		 * 
		 * @param 	arrData	근로자 근무처 정보
		 * @return void
		 */
		private function parseMyPns7(arrData1:ArrayCollection, arrData2:ArrayCollection, arrData3:ArrayCollection, arrData4:ArrayCollection, params:URLVariables):void {
			var rec:PnsReportVO	
			var i:int;
			
			params["P1_COUNT"] =  arrData1.length;
			for(i=0; i<arrData1.length; i++) {
				rec = arrData1.getItemAt(i) as PnsReportVO;
	          	params["P1_SUBT"+i] = rec["SUBT"];		// Subtype
	          	params["P1_PNST"+i] = rec["PNST"];		// 구분 
	          	params["P1_INSN"+i] = rec["INSN"];		// 금융기관
	          	params["P1_ACCN"+i] = rec["ACCN"];		// 계좌번호 
	          	params["P1_AMTP"+i] = rec["AMTP"];		// NTS로부터의 비용 금액 정보
	          	params["P1_AMNT"+i] = rec["AMNT"];		// 불입금액
	          	params["P1_AMTD"+i] = rec["AMTD"];		// 공제금액
			}
  	
			params["P2_COUNT"] =  arrData2.length;
			for(i=0; i<arrData2.length; i++) {
				rec = arrData2.getItemAt(i) as PnsReportVO;
	          	params["P2_SUBT"+i] = rec["SUBT"];		// Subtype
	          	params["P2_PNST"+i] = rec["PNST"];		// 구분 
	          	params["P2_INSN"+i] = rec["INSN"];		// 금융기관
	          	params["P2_ACCN"+i] = rec["ACCN"];		// 계좌번호 
	          	params["P2_AMTP"+i] = rec["AMTP"];		// NTS로부터의 비용 금액 정보
	          	params["P2_AMNT"+i] = rec["AMNT"];		// 불입금액
	          	params["P2_AMTD"+i] = rec["AMTD"];		// 공제금액
			}
  		
			params["P3_COUNT"] =  arrData3.length;
			for(i=0; i<arrData3.length; i++) {
				rec = arrData3.getItemAt(i) as PnsReportVO;
	          	params["P3_SUBT"+i] = rec["SUBT"];		// Subtype
	          	params["P3_PNST"+i] = rec["PNST"];		// 구분 
	          	params["P3_INSN"+i] = rec["INSN"];		// 금융기관
	          	params["P3_ACCN"+i] = rec["ACCN"];		// 계좌번호 
	          	params["P3_AMTP"+i] = rec["AMTP"];		// NTS로부터의 비용 금액 정보
	          	params["P3_AMNT"+i] = rec["AMNT"];		// 불입금액
	          	params["P3_AMTD"+i] = rec["AMTD"];		// 공제금액
			}
  		
			params["P4_COUNT"] =  arrData4.length;
			for(i=0; i<arrData4.length; i++) {
				rec = arrData4.getItemAt(i) as PnsReportVO;
	          	params["P4_SUBT"+i] = rec["SUBT"];		// Subtype
	          	params["P4_PNST"+i] = rec["PNST"];		// 구분 
	          	params["P4_INSN"+i] = rec["INSN"];		// 금융기관
	          	params["P4_ACCN"+i] = rec["ACCN"];		// 계좌번호 
	          	params["P4_AMTP"+i] = rec["AMTP"];		// NTS로부터의 비용 금액 정보
	          	params["P4_AMNT"+i] = rec["AMNT"];		// 불입금액
          		params["P4_AMTD"+i] = rec["AMTD"];		// 공제금액
			}
  		
  		}

////////////////////////////////

		/**
		 * Main Module에서 QueryClose 메세지가 왔을 때의 처리
		 *     - 사용자에게 확인하고 View에 종료처리 -> MainModule에 'CLOSE_MODULE' 전송
		 * @param
		 * @return void
		 */
		private function onQueryCloseModule():void
		{
			PsHrAlert.showMsgYesNo("연말정산 Close?", "확인", null, onMsgQueryCloseY, onMsgQueryCloseN);
		}
		
		///////////////////////////////////////////////////////////////////////////////////////////////////
		//
		//	Event handler (from View, Internal or....)
		//
		///////////////////////////////////////////////////////////////////////////////////////////////////
 		/**
		 * 모듈 Close 확인 창을 사용자가 확인후 처리
		 *     - Close OK     : View에 종료처리 -> MainModule에 'CLOSE_MODULE' 전송
		 *	   - Close Cancel : 처리 없음 
		 * @param
		 * @return void
		 */
		private function onMsgQueryCloseY():void{
			mainFacade.sendNotification(Messages.ADMIT_CLOSE_MODULE, this);
		}
		
		private function onMsgQueryCloseN():void{
			mainFacade.sendNotification(Messages.DENY_CLOSE_MODULE, this);
		}

		
		///////////////////////////////////////////////////////////////////////////////////////////////////
		//
		//	Utility Functions
		//
		///////////////////////////////////////////////////////////////////////////////////////////////////
        private function get view():YearAdjustmentView
        {
            return viewComponent as YearAdjustmentView;
        }
	}
}